# Generated by Django 4.2.10 on 2024-04-12 08:08

from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('slug', models.SlugField(blank=True, max_length=255, unique=True, verbose_name='URL')),
                ('avatar', models.ImageField(blank=True, default='images/avatars/default.jpg', upload_to='images/avatars/%Y/%m/%d/', validators=[django.core.validators.FileExtensionValidator(allowed_extensions=('png', 'jpg', 'jpeg'))], verbose_name='Аватар')),
                ('bio', models.TextField(blank=True, max_length=500, verbose_name='Информация о себе')),
                ('birth_date', models.DateField(blank=True, null=True, verbose_name='Дата рождения')),
                ('following', models.ManyToManyField(blank=True, related_name='followers', to='system.profile', verbose_name='Подписки')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Профиль',
                'verbose_name_plural': 'Профили',
                'db_table': 'app_profiles',
                'ordering': ('user',),
            },
        ),
        migrations.CreateModel(
            name='Feedback',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('subject', models.CharField(max_length=255, verbose_name='Тема письма')),
                ('email', models.EmailField(max_length=255, verbose_name='Электронный адрес (email)')),
                ('content', models.TextField(verbose_name='Содержимое письма')),
                ('time_create', models.DateTimeField(auto_now_add=True, verbose_name='Дата отправки')),
                ('ip_address', models.GenericIPAddressField(blank=True, null=True, verbose_name='IP отправителя')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='Пользователь')),
            ],
            options={
                'verbose_name': 'Обратная связь',
                'verbose_name_plural': 'Обратная связь',
                'db_table': 'app_feedback',
                'ordering': ['-time_create'],
            },
        ),
    ]
